package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WorkMapper {
    /**
     * 根据套餐状态统计套(起售暂停)数量
     *
     * @param status
     * @return
     */
    @Select("select count(id) from setmeal where status=#{status}")
    Integer getSetmealCount(Integer status);

    /**
     * 查询菜品总览
     *
     * @param status
     * @return
     */
    @Select("select count(id) from dish where status=#{status}")
    Integer getDishCount(Integer status);

    /**
     * 查询订单管理数据
     *
     * @param status
     * @return
     */
    Integer getOrderOverView(Integer status);

    /**
     * 查询总订单数
     *
     * @return
     */
    @Select("select count(id) from orders")
    Integer getAllOrders();
}
